Ejercicio 4

function [h,l]=catenaria(a,T0,P,hmin)
a=400;
T0=2205;
P=0.975;
gamma=P/(2*T0);
h=(cosh(gamma*a)-1)/gamma;
hmin=6;
f=@(x) (cosh(gamma*(2*x-a))-cosh(gamma*a))/(2*gamma)+h+hmin;
fplot(f,[0,a]);
ylim([0 f(0)+hmin]);
xlim([0 a]);
grid on
ans =

   17.6986